package com.tencent.sr.iris.activity.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 用户权益发放流水-发放状态
 */
@AllArgsConstructor
@Getter
public enum AwardRecordIssueStatusEnum {
    ISSUE_SUCCEED((byte) 0, "发放成功"),
    ISSUE_FAILED((byte) 1, "发放失败"),
    ISSUE_UNABLE((byte) 3, "不可派奖");

    private final byte code;
    private final String desc;

    public static AwardRecordIssueStatusEnum getByCode(byte code) {
        for (AwardRecordIssueStatusEnum event : AwardRecordIssueStatusEnum.values()) {
            if (event.getCode() == code) {
                return event;
            }
        }
        return null;
    }
}
